<?php 

abstract class MrMongoDocument extends EMongoDocument {
	
		public function find($criteria = null) {
			if(is_array($criteria)){
				return $this->findByAttributes($criteria);
			}
			return parent::find($criteria);
			
		}
		
		public function findAll($criteria = null) {
			if(is_array($criteria)){
				return $this->findAllByAttributes($criteria);
			}
			return parent::findAll($criteria);
		}
	
}